package com.find.memories;

import java.util.ArrayList;
import java.util.Comparator;

import android.app.Activity;
import android.support.v4.app.Fragment;

public abstract class BaseFragment extends Fragment{
    
    MainActivity mActivity;
    
    public abstract void onInit();
    public abstract void onRefresh(int nYear, int nMonth, int nDay);

    public abstract ArrayList<Integer> getExistDays(int year, int month);
    
    public class NoAscCompare implements Comparator<Integer> {
        /**
         * 오름차순(ASC)
         */
        @Override
        public int compare(Integer arg0, Integer arg1) {
            // TODO Auto-generated method stub
            return arg0 < arg1 ? -1 : arg0 > arg1 ? 1:0;
        }
 
    }
    
    public void setActivity(MainActivity activity) {
        mActivity = activity;
    }
}
